<?php
namespace app\wxapp\controller;

use app\common\entity\Result;
use app\Request;
use app\common\service\RecommendService;
use think\facade\Cache;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/9/29 0029
 * Time: 8:54
 */
class Index extends Base {
    /**
     * 获取用户设置和后台推荐的视频和专栏的合集 排序按照热度排序
     */
    public function index(){
        $service = new RecommendService();
        $res = $service->recommend($this->user['id']);
        return Result::success($res);
    }

    public function store(){
        echo Cache::get("appname");
        echo "<br />";
        echo Cache::get("filename");
    }

    public function third(Request $request){
        $code = $request->param('code');

    }


}